package com.hspedu.homework.homework08;
//扩展下面的BankAccount类
class BankAccount{
    private double balance;
    public BankAccount(double initialBalance){
        this.balance =initialBalance;
    }

    public void deposit(double amount){
        balance += amount;
    }
    public void withdraw(double amount){
        balance -= amount;
    }
    //

    public void setBalance(double balance) {
        this.balance = balance;
    }
    public double getBalance(){
        return balance;
    }
}